import {request} from "../util/http";


export function tree(id, dir, next) {
    return request.post("/bucket/detail/tree", {id: id, dir: dir, next: next})
}

export function list(body) {
    return request.post("/bucket/detail/list", body)
}

export function datasetUpload(formData, object) {
    return request.post('/dataset/upload', formData, object)
}

export function del(body) {
    return request.post("/bucket/detail/del", body)
}

export function download(body) {
    return request.post("/bucket/detail/download", body, {
        responseType: 'blob',
    })
}

export function rename(body) {
    return request.post("/bucket/detail/rename", body)
}

export function copy(id, files, target) {
    return request.post("/bucket/detail/copy", {id: id, files: files, target: target})
}

export function cut(id, files, target) {
    return request.post("/bucket/detail/cut", {id: id, files: files, target: target})
}
